1. /* rdxconv.cpp by K.Tsuru */
  2. // since ver 2.18
  3. /*****************************************
  4. SNumber sub-function
  5. It converts "long x" to "f[]" in radix R.
  6. and returns "n".
  7. x = f[n-1]*R^(n-1) + ... +f[1]*R + f[0]
  8. *****************************************/
  9. int rdxconv(int *f, long x, long R) {
  10. int i = 0;
  11. while(x) {
  12. f[i++] = x % R; x /= R;
  13. }
  14. return i;
  15. }

rdxconv.cpp : last modifiled at 2008/04/24 10:36:30(377 bytes)
created at 2016/04/11 11:17:20
The creation time of this html file is 2017/10/07 10:54:16 (Sat Oct 07 10:54:16 2017).